pp108 : onselect Event (Deprecated)

onselect Event (Deprecated)


Fires every time the select method of an application is called.

This event is deprecated; use onapplicationselect instead.

Syntax

Inline HTML <HTML xmlns:eibus onselect="handler()"...>
Event property application.onselect = handler


Event Information

To invoke Create an Application or call the select() method of the application.
Default Action Selects an application and initiates any action associated with this event.


Event Object Properties


Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.

Property Description
application Read-only. Object that denotes the XML definition of the application that is opened. This property is DEPRECATED. It is recommended to use the applicationDefinition property instead.
applicationDefinition Read-only. Object that denotes the XML definition of the application opened.
data Variant that contains data that is passed to the application as a second parameter to the select method of the application component. If the select() method is as a result of a tree operation, then the data property contain the following properties in addition to custom properties.
exploreType String that denotes the type of the operation involved. It can be "expand" or "select".
menuItem Object that contains the XML reference of the TreeItem that caused the event.
srcApplication Read-only. Object that contains the source application that caused the event.


Example


The following example demonstrates the use of the onselect event.

//Script that calls the application's select method in the parent page
application.select(newApplication, someData);
<!-- HTML definition in the new application opened -->
<HTML onselect="selectApplication()">
//Script for onselect function handler
function selectApplication()
{
    application.notify("Data :  " + event.data);
    application.notify("Explore type : " + event.exploreType);
    //Look at the application definition
    application.notify("Application Definition \n\n : " + application.event.applicationDefinition.xml);
}


Note: For onselect event to be fired for standalone applications and for applications loaded in iframe or in wizard steps, the url should contain the data as query string with value as xml string. Example, /cordys/wcp/testonselect.htm?data="<data/>".

See Also


application